<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="fp141670">gp_resgroup_status</title>
  <body>
    <p>The <codeph>gp_toolkit.gp_resgroup_status</codeph> view allows administrators to see status
      and activity for a resource group. It shows how many queries are waiting
      to run and how many queries are currently active in the system for each resource
      group. The view also displays current memory and CPU usage for the resource group.</p>
      <note>The <codeph>gp_resgroup_status</codeph> view is valid only when resource group-based resource management is active.</note>
    <table id="fp141982">
      <title>gp_toolkit.gp_resgroup_status</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="114pt"/>
        <colspec colnum="2" colname="col2" colwidth="66pt"/>
        <colspec colnum="3" colname="col3" colwidth="133.5pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph>rsgname</codeph>
            </entry>
            <entry colname="col2">name</entry>
            <entry colname="col3">pg_resgroup.rsgname</entry>
            <entry colname="col4">The name of the resource group.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>groupid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_resgroup.oid</entry>
            <entry colname="col4">The ID of the resource group.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>num_running</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The number of transactions currently running in the resource group.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>num_queueing</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The number of currently queued transactions for the resource group.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>num_queued</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The total number of queued transactions for the resource group since the Greenplum Database cluster was last started, excluding the <codeph>num_queueing</codeph>.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>num_executed</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The total number of transactions run in the resource group since the Greenplum Database cluster was last started, excluding the <codeph>num_running</codeph>.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>total_queue_duration</codeph>
            </entry>
            <entry colname="col2">interval</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The total time any transaction was queued since the Greenplum Database cluster was last started.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>cpu_usage</codeph>
            </entry>
            <entry colname="col2">json</entry>
            <entry colname="col3"/>
            <entry colname="col4">A set of key-value pairs. For each segment instance (the key), the
              value is the real-time, per-segment instance CPU core usage by a resource group. The
              value is the sum of the percentages (as a decimal value) of CPU cores that are used by
              the resource group for the segment instance.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>memory_usage</codeph>
            </entry>
            <entry colname="col2">json</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The real-time memory usage of the resource group on each Greenplum Database segment's host.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
    <p> </p>
    <p conref="../gp_toolkit.xml#topic31x/json_field_info1"/>
    <p conref="../gp_toolkit.xml#topic31x/json_field_info2"/>
  </body>
</topic>
